package saticproxy.api.Impl;


import saticproxy.api.CalculationService;

// 代理类
public class CalculationServiceProxy implements CalculationService {
    private CalculationServiceImpl realService;

    public CalculationServiceProxy() {
        realService = new CalculationServiceImpl();
    }

    @Override
    public int add(int a, int b) {
        System.out.println("日志: add ...");
        return realService.add(a, b);
    }

    @Override
    public int subtract(int a, int b) {
        System.out.println("日志: subtract ...");
        return realService.subtract(a, b);
    }
}